﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using YUCodeGen.Annotation;

namespace YUCodeGen.ProductModel
{
    
    public class Student
    {


        public long Id { get; set; }

        [MaxLength(20)]
        [MinLength(2)]
        [Required]
        [Create]
        [ListField]
        public string Name { get; set; }

        
        [Phone]
        [Create]
        [ListField]
        public string Phone { get; set; }

        [Required]
        [ListField]
        
        public DateTime Birthday { get; set; }

        [MaxLength(50)]
        [ListField]
        public string Address { get; set; }

        [EmailAddress]
        [Required]
        [Create]
        [ListField]
        public string Email { get; set; }

        
        [Required]
        [Range(10,150)]
        public int Age { get; set; }
        

        [DataType(DataType.ImageUrl)]
        public string Avatar { get; set; }

        [DataType(DataType.Password)]
        [Create]
        public string Password { get; set; }

        [Url]
        public string Url { get; set; }

        [RegularExpression("[A-z]{3}")]
        public string Regular { get; set; }

        [MaxLength(100)]
        [Required]
        [DataType(DataType.MultilineText)]
        public string History { get; set; }

        [DataType(DataType.Upload)]
        public string Appendix { get; set; }

        [DataType(DataType.Time)]
        public DateTime Getup { get; set; }
        

    }
}